package com.morning.dp.tools.dp.context;

import java.util.List;

/**
 * ParameterizeContextWrapper
 *
 * @author @阿秋
 * @date 2021/2/6
 */
public class ParameterizeContextAdaptor implements ParameterizeContext {
    private final ParameterizeContext parameterizeContext;

    public ParameterizeContextAdaptor(ParameterizeContext parameterizeContext) {
        this.parameterizeContext = parameterizeContext;
    }

    @Override
    public <P> P getParam(String paramName, Class<P> paramType) {
        return parameterizeContext.getParam(paramName, paramType);
    }

    @Override
    public <P> P getParam(Class<P> paramType) {
        return parameterizeContext.getParam(paramType);
    }

    @Override
    public <P> List<P> getListParam(String paramName, Class<P> paramType) {
        return parameterizeContext.getListParam(paramName, paramType);
    }

    @Override
    public <P> List<P> getListParam(Class<P> paramType) {
        return parameterizeContext.getListParam(paramType);
    }

    @Override
    public void setParam(String paramName, Object param) {
        parameterizeContext.setParam(paramName, param);
    }

    @Override
    public void setParam(Object param) {
        parameterizeContext.setParam(param);
    }
}
